package com.ruix.app.util;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;

/**
 * Created by hadexs on 2017/4/30.
 */

public class CopyUtil {

    //复制到剪切板
    public static void clipboardCopy(Context context,String content){
        ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
//        cm.setText(content);
        cm.setPrimaryClip(ClipData.newPlainText(null,content));
    }
}
